package com.ds.robot.assistant.enums;

import lombok.Getter;

/**
 * 作用：
 *
 * @author WeiShaoying
 * 
 */
@Getter
public enum MetricType {

    /**
     * 用户端
     */
    CLIENT(1, "用户端"),

    CLIENT_APP(2, "APP活跃占比"),

    /**
     * 加盟商业绩
     */
    FRANCHISEE_PERFORMANCE(3, "加盟商业绩"),

    /**
     * 工具使用次数
     */
    TOOL_USAGE_COUNT(4, "工具使用次数"),

    /**
     * 云仓代发覆盖率
     */
    CLOUD_WAREHOUSE_COVERAGE(5, "云仓代发覆盖率");

    private final Integer value;

    private final String description;

    MetricType(Integer value, String description) {
        this.value = value;
        this.description = description;
    }

    //通过value获取枚举对象
    public static MetricType getByValue(Integer value) {
        for (MetricType metricType : MetricType.values()) {
            if (metricType.getValue().equals(value)) {
                return metricType;
            }
        }
        return null;
    }

}
